﻿using MaiPlanServer.Model;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace MaiPlanServer.IServices.IQualityServices
{
    public interface IDetectionTemplateServices
    {
        /// <summary>
        /// 分页获取数据
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <param name="TCode">模板编号</param>
        /// <param name="TName">模板名称</param>
        /// <param name="PCode">产品编号</param>
        /// <param name="PName">产品名称</param>
        /// <param name="Types">检测种类</param>
        /// <returns></returns>
        public Task<IEnumerable<qc_template>> GetJsonAsync(int PageIndex,int PageSize,string TCode,string TName,string PCode,string PName,string Types);

        /// <summary>
        /// 获取数据总条数
        /// </summary>
        /// <param name="TCode">模板编号</param>
        /// <param name="TName">模板名称</param>
        /// <param name="PCode">产品编号</param>
        /// <param name="PName">产品名称</param>
        /// <param name="Types">检测种类</param>
        /// <returns></returns>
        public Task<int> GetCountAsync(string TCode, string TName, string PCode, string PName, string Types);

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> AddAsync(qc_template model);

        /// <summary>
        /// 删除单条
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DelAsync(string Id);

        /// <summary>
        /// 删除多条
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DelAsync(string[] Id);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> UpdateAsync(qc_template model);

        /// <summary>
        /// 分页获取检测项数据
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <returns></returns>
        public Task<IEnumerable<qc_template_index>> GetIJsonAsync(int PageIndex,int PageSize);

        /// <summary>
        /// 获取检测项总条数
        /// </summary>
        /// <returns></returns>
        public Task<int> GetICountAsync();

        /// <summary>
        /// 添加检测项
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> AddIAsync(qc_template_index model);

        /// <summary>
        /// 删除多条检测项
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DelIAsync(string[] Id);

        /// <summary>
        /// 删除单条检测项
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DelIAsync(string Id);

        /// <summary>
        /// 修改检测项
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> UpdateIAsync(qc_template_index model);

        /// <summary>
        /// 分页获取物料产品
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="PageSize"></param>
        /// <returns></returns>
        public Task<IEnumerable<qc_template_product>> GetPJsonAsync(int PageIndex,int PageSize);

        /// <summary>
        /// 获取物料产品总条数
        /// </summary>
        /// <returns></returns>
        public Task<int> GetPCountAsync();

        /// <summary>
        /// 添加物料产品
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> AddPAsync(qc_template_product model);

        /// <summary>
        /// 删除多条物料产品
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DelPAsync(string[] Id);

        /// <summary>
        /// 删除单条物料产品
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DelPAsync(string Id);

        /// <summary>
        /// 修改物料产品
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> UpdatePAsync(qc_template_product model);
    }
}
